﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ForstDoeninge
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            CRSettings.myPrefs.Load();

            numericUpDown1.Value = new decimal(CRSettings.myPrefs.ArcaneTorrent);
            numericUpDown2.Value = new decimal(CRSettings.myPrefs.naruupercent);
            numericUpDown3.Value = new decimal(CRSettings.myPrefs.IceBarrier);
            numericUpDown4.Value = new decimal( CRSettings.myPrefs.UseAoe);
            numericUpDown5.Value = new decimal(CRSettings.myPrefs.EatDrink);
            numericUpDown6.Value = new decimal(CRSettings.myPrefs.healthstonepercent);

            checkBox1.Checked = CRSettings.myPrefs.Movement;
            checkBox2.Checked = CRSettings.myPrefs.Facing;
            checkBox3.Checked = CRSettings.myPrefs.Targetting;
            checkBox4.Checked = CRSettings.myPrefs.useFireBlast;
            checkBox5.Checked = CRSettings.myPrefs.RingOfFrost;
            checkBox6.Checked = CRSettings.myPrefs.Counterspell;
            checkBox7.Checked = CRSettings.myPrefs.trinket1;
            checkBox8.Checked = CRSettings.myPrefs.trinket2;
            checkBox9.Checked = CRSettings.myPrefs.gloves;
            checkBox10.Checked = CRSettings.myPrefs.jadepotion;
            checkBox11.Checked = CRSettings.myPrefs.intflask;
            checkBox12.Checked = CRSettings.myPrefs.alchemyflask;


            comboBox1.SelectedIndex = CRSettings.myPrefs.Armor;
            comboBox2.SelectedIndex = CRSettings.myPrefs.IcyVeins;
            comboBox3.SelectedIndex = CRSettings.myPrefs.MirrorImage;
            comboBox4.SelectedIndex = CRSettings.myPrefs.FrozenOrb;
            comboBox5.SelectedIndex = CRSettings.myPrefs.AlterTime;

        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.ArcaneTorrent = (int)numericUpDown1.Value;
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.Movement = checkBox1.Checked;
        }

        private void checkBox2_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.Facing = checkBox2.Checked;
        }

        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.Targetting = checkBox3.Checked;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            CRSettings.myPrefs.Save();
            Close();
        }

        private void numericUpDown2_ValueChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.naruupercent = (int)numericUpDown2.Value;
        }

        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.useFireBlast = checkBox4.Checked;
        }

        private void numericUpDown3_ValueChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.IceBarrier = (int)numericUpDown3.Value;
        }

        private void numericUpDown4_ValueChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.UseAoe = (int)numericUpDown4.Value;
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.Armor = comboBox1.SelectedIndex;
        }

        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.IcyVeins = comboBox2.SelectedIndex;
        }

        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.MirrorImage = comboBox3.SelectedIndex;
        }

        private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.FrozenOrb = comboBox4.SelectedIndex;
        }

        private void checkBox5_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.RingOfFrost = checkBox5.Checked;
        }

        private void numericUpDown5_ValueChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.EatDrink = (int)numericUpDown5.Value;
        }

        private void numericUpDown6_ValueChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.healthstonepercent = (int)numericUpDown6.Value;
        }

        private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.AlterTime = comboBox5.SelectedIndex;
        }

        private void checkBox6_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.Counterspell = checkBox6.Checked;
        }

        private void checkBox7_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.trinket1 = checkBox7.Checked;
        }

        private void checkBox8_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.trinket2 = checkBox8.Checked;
        }

        private void checkBox9_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.gloves = checkBox9.Checked;
        }

        private void checkBox10_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.jadepotion = checkBox10.Checked;
        }

        private void checkBox11_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.intflask = checkBox11.Checked;
        }

        private void checkBox12_CheckedChanged(object sender, EventArgs e)
        {
            CRSettings.myPrefs.alchemyflask = checkBox12.Checked;
        }

        
    }
}
